package com.heba;

import android.util.Log;

import com.heba.greenmulu.BuildConfig;

import java.util.Date;

/**

 */
public class Debug {
    public static Date lastTime;

    /**
     * debug
     *
     * @param str
     * @param str2
     */
    public static void Log(String str, String str2) {
        if (!BuildConfig.DEBUG)
            return;
        if (lastTime == null) {
            lastTime = new Date();
            Log.d("atd-debug-start", String.valueOf(lastTime.getTime()));
        }
        Date newTime = new Date();
        Log.d("atd-" + str,
                str2 + ", " + String.valueOf(newTime.getTime() - lastTime.getTime()));
        lastTime = newTime;
    }

    /**
     * error
     *
     * @param str
     * @param str2
     */
    public static void LogError(String str, String str2) {
        if (!BuildConfig.DEBUG)
            return;
        if (lastTime == null) {
            lastTime = new Date();
            Log.d("atd-debug-start", String.valueOf(lastTime.getTime()));
        }
        Date newTime = new Date();
        Log.e("atd-error-" + str,
                str2 + ", " + String.valueOf(newTime.getTime() - lastTime.getTime()));
        lastTime = newTime;
    }

    public static void Log(String toString) {
    }
}
